//
//  DocListDataItem.h
//  Personal Passlock
//
//  Created by 杨岑 on 5/12/15.
//  Copyright (c) 2015 杨岑. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, DocumentStatus)
{
    DocumentStatusUnknown,
    DocumentStatusCurrent,
    DocumentStatusNotRecent,
    DocumentStatusNotLocal
};

typedef NS_ENUM(NSInteger, DocumentState)
{
    DocumentStateUnknown,
    DocumentStateNormal,
    DocumentStateDeleting,
    DocumentStateRenamming,
    DocumentStateMoving
};

@interface DocListDataItem : NSObject
@property NSMetadataItem* metadataItem;
@property NSURL* URL;
@property NSString* filename;
@property NSString* name;
@property NSDate* lastModification;
@property BOOL inConflict;
@property BOOL isPrimary;
@property NSNumber* percentDownloaded;
@property DocumentStatus status;
@property DocumentState state;

+ (instancetype)create:(NSMetadataItem*)metadataItem;
- (void)copyFrom:(DocListDataItem*)from;

@end
